﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master"Inherits="System.Web.Mvc.ViewPage<TemplateWeb.Models.ViewModels.GroupViewModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	SelectNhaDat
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent1" runat="server">
	<span class="AdminTitle" style="color:#cc0000;">NhaDat Management</span>
	(<a href="<%= Url.Action("Index", "Home") %>" class="AdminPageText">
	<%= WebConfiguration.SiteName  %>
	</a>)
	<br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent2" runat="server">
	<script src="../../Scripts/fckeditor/fckeditor.js" type="text/javascript"></script>
	<script type="text/javascript">
		window.onload = function () {
			var objFckEditor = new FCKeditor('NhaDat_NoiDung');
			objFckEditor.BasePath = '<%= ResolveUrl("~/Scripts/fckeditor/")%>';
			objFckEditor.Height = 280;
			objFckEditor.Width = 590;
			objFckEditor.ToolbarSet = 'MyTemplateWebToolbar';
			objFckEditor.ReplaceTextarea();
			<% if (Model.NhaDatModel.AddModel.Added){ %>
				alert("A new item has been added!");
			<% } %>
		}
	</script>
	<div id="PartialDiv">
		<% Html.RenderPartial("Templates/TH_ListNhaDat", Model); %>
	</div>
	<% using (Html.BeginForm("InsertNhaDat", "Admin", FormMethod.Post, new { enctype = "multipart/form-data", onsubmit = "return ValidateNhaDat();" }))
	{ %>
		<input type="hidden" name="NhaDat_IDLoaiBatDongSan" value="<%= Model.NhaDatModel.ReferKeys.IDLoaiBatDongSan %>" />
		<input type="hidden" name="NhaDat_IDQuanHuyen" value="<%= Model.NhaDatModel.ReferKeys.IDQuanHuyen %>" />
		<input type="hidden" name="NhaDat_IDNguoiDang" value="<%= Membership.GetUser(Page.User.Identity.Name).ProviderUserKey %>" />
        <input type="hidden" name="NhaDat_NgayDang" value="<%= DateTime.Now.ToString() %>" />
        <input type="hidden" name="NhaDat_NoiDungRutGon" />
		<div style="padding-top: 30px">
            <span style="font-size:18px; font-weight:bold;">Add New NhaDat</span>
            <br />
            <br />
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="AdminPageText">
				<tbody>
                    <tr>
                        <td colspan="2" style="border-bottom:thin solid #ff0000;">
                            <span style="font-size:14px; font-weight:bold; ">Thông tin</span>
                        </td>
                    </tr>
					<tr>
                        <td>
                            <table>
                                <tr>
                                    <td>
							            <div align="left" style="padding-top:10px; width: 110px;">
								            <font class="normal8">Gia: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px; width: 170px;">
								            <%= Html.TextBox("NhaDat_Gia")%>
							            </div>
						            </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; padding-left: 60px; width: 110px;">
								            <font class="normal8">LoaiGia: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px; width: 170px;">
                                            <%= Html.DropDownList("NhaDat_IDLoaiGia", new SelectList(Model.LoaiGiaModel.GetModel.LstObjModel, "ID", "TenLoaiGia"))%>
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
					</tr>
					<tr>
                        <td colspan="2">
                            <table>
                                <tr>
                                    <td>
					                    <div align="left" style="padding-top:10px; width: 110px;">
						                    <font class="normal8">DiaChi: </font>
					                    </div>
				                    </td>
				                    <td height="15">
					                    <div align="left" style="padding-top:10px; width: 170px;">
						                    <%= Html.TextBox("NhaDat_DiaChi")%>
					                    </div>
				                    </td>
                                </tr>
                            </table>
                        </td>
					</tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; width: 110px;">
								            <font class="normal8">DienTichNgang: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px; width: 170px;">
								            <%= Html.TextBox("NhaDat_DienTichNgang")%> m
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; padding-left: 60px; width: 110px;">
								            <font class="normal8">DienTichDoc: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px; width: 170px;">
								            <%= Html.TextBox("NhaDat_DienTichDoc")%> m
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
					</tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; width: 110px;">
								            <font class="normal8">DienTichXayDung: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px; width: 170px;">
								            <%= Html.TextBox("NhaDat_DienTichXayDung")%> m2
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; padding-left: 60px; width: 110px;">
								            <font class="normal8">DienTichSuDung: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px; width: 170px;">
								            <%= Html.TextBox("NhaDat_DienTichSuDung")%> m2
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
					</tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; width: 110px;">
								            <font class="normal8">CoSoHong: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px; width: 170px;">
                                            <%= Html.CheckBox("NhaDat_CoSoHong")%>
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; padding-left: 60px; width: 110px; color: Red;">
								            <font class="normal8">TinVip: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px; width: 170px;">
								            <%= Html.CheckBox("NhaDat_TinVip")%>
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
					</tr>
                    <!-- TIEC ICH -->
                    <tr>
                        <td colspan="2" style="padding-top: 15px; padding-left: 5px; border-bottom:thin solid #ff0000;">
                            <span style="font-size:14px; font-weight:bold;">Tiện ích</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">DongHoDien: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIch_DongHoDien")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">DongHoNuoc: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIch_DongHoNuoc")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 11%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">MayPhatDien: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIch_MayPhatDien")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">MayBomNuoc: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIch_MayBomNuoc")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">GiengDong: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIch_GiengDong")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">DienThoai: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIchKhac_DienThoai")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left;">
							            </div>
                                        <div align="left" style="padding-top:7px;">
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left;">
							            </div>
                                        <div align="left" style="padding-top:7px;">
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <!-- TIEN ICH KHAC -->
                    <tr>
                        <td colspan="2" style="padding-top: 15px; padding-left: 5px; border-bottom:thin solid #ff0000;">
                            <span style="font-size:14px; font-weight:bold;">Tiện ích khác</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">GaraOto: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIchKhac_GaraOto")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">MayLanh: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("TienIchKhac_MayLanh")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 11%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">TruyenHinhCap: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIchKhac_TruyenHinhCap")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">SanVuon: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("TienIchKhac_SanVuon")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">MayNuocNong: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIchKhac_MayNuocNong")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">Internet: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("TienIchKhac_Internet")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 11%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">HoBoi: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("TienIchKhac_HoBoi")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">ChoDauXeHoi: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("TienIchKhac_ChoDauXeHoi")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <!-- VAN HOA XA HOI -->
                    <tr>
                        <td colspan="2" style="padding-top: 15px; padding-left: 5px; border-bottom:thin solid #ff0000;">
                            <span style="font-size:14px; font-weight:bold;">Văn hóa xã hội</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">GanTruongCap1: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanTruongCap1")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">GanTruongCap2: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanTruongCap2")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 11%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">GanTruongCap3: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanTruongCap3")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">GanTruongMG: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanTruongMauGiao")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">GanTruongDHCD: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanTruongDHCD")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">GanTTThuongMai: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanTrungTamThuongMai")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 11%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">KhuDanTriCao: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_KhuDanTriCao")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">GanCho: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanCho")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">GanCongVien: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanCongVien")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">GanBenhVien: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanBenhVien")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td style="width: 11%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
								            <font class="normal8">GanTTGiaiTri: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
								            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_GanTrungTamGiaiTri")%> </font>
							            </div>
                                    </td>
                                    <td style="width: 25%">
                                        <div align="left" style="padding-top:10px; float:left; width: 100px;">
                                            <font class="normal8">TienKinhDoanh: </font>
							            </div>
                                        <div align="left" style="padding-top:7px;">
                                            <font class="normal8"><%= Html.CheckBox("VanHoaXaHoi_TienKinhDoanh")%> </font>
							            </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <!-- THONG TIN NHA DAT -->
                    <tr>
                        <td colspan="2" style="padding-top: 15px; border-bottom:thin solid #ff0000;">
                            <span style="font-size:14px; font-weight:bold;">Thông tin nhà đất</span>
                        </td>
                    </tr>
					<tr>
                        <td colspan="2">
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; width: 100px;">
								            <font class="normal8">TieuDe: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px">
								            <input name="NhaDat_TieuDe" style="width: 450px;" />
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
					</tr>
                    <tr>
                        <td colspan="2">
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; width: 100px;">
								            <font class="normal8">NoiDung: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px; width: 140px;">
								            <%= Html.TextArea("NhaDat_NoiDung")%>
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <table>
                                <tr>
						            <td>
							            <div align="left" style="padding-top:10px; width: 100px;">
								            <font class="normal8">HinhMinhHoa: </font>
							            </div>
						            </td>
						            <td height="15">
							            <div align="left" style="padding-top:10px">
								            <input type="file" name="NhaDat_HinhMinhHoa" />
							            </div>
						            </td>
					            </tr>
                            </table>
                        </td>
					</tr>
					<tr>
                        <td>
                            <table>
                                <tr>
                                    <td height="15" style="width: 100px">
						            </td>
						            <td height="15">
							            <div align="left">
								            <br/>
								            <p>
									            <input type="submit" value="Add New" />
								            </p>
							            </div>
						            </td>
                                </tr>
                            </table>
                        </td>
					</tr>
				</tbody>
			</table>
		</div>
	<% } %>
</asp:Content>
